import axios from 'axios'
import './App.css';
import React from 'react';
import {Switch,Route} from 'react-router-dom'
import Box from './view/box'


axios.interceptors.request.use((config)=>{
  
  if (localStorage.login) {
    var login = JSON.parse(localStorage.login)
    console.log(login);
    config.headers={
      authKey:login.authKey,
      sessionId:login.sessionId
    }
    return config
  }else{
    return config
  }
})
function App(props) {
  return(
    <div style={{background:'#f5f6f9'}}>
      
      <Switch>
        <Route path="/App/" component={Box} />
      </Switch>
    </div>
)
}

export default App;
